<<?
        require_once('../inc/global.php');
        require_once('Data.php');
        $result = GetCart();
         if(isset($_REQUEST['Submit']))
        {
                $rs = $_REQUEST;
                 CreateCart($rs);
                 header("location: cart.php");
        }       
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<style type="text/css">
.main
{
position:absolute;
right:300px;
left:300px;
}

</style>


</head>

<body >

<div class=main>
<font color=#006784 size=24>E-Commerce Web Site</font>


<?php   $section = 'cart'; ?>
        <?php include ('tabs.php'); ?>
    <div class="content">
     Cart 
    </div>

<div id="tableWrapper">
<center>
<table border="1">
                        <tr>
                                <th>Actions</th>
                                <th>ImageLink</th>
                                <th>Category</th>
                                <th>Value</th>
                        </tr>
        
        <?
                while($rs = $result->fetch_assoc()){
                        include 'row.php'; 
                }
        ?>
        <form method="post">
         <tr><td>Insert New::</td><td><input  type="text" name="ImageLink" id="ImageLink"
                                                class="<? if(isset($errors['ImageLink'])){ ?>error<? } ?>"
                                                value="<?=$rs['ImageLink']?>" />
                                                <? if(isset($errors['ImageLink'])){ ?>
                                                        <span class="error"><?=$errors['ImageLink']?></span>
                                                <? } ?></td>
 
<td><input  type="text" name="Category" id="Category"
                                              class="<? if(isset($errors['Category'])){ ?>error<? } ?>"
                                                value="<?=$rs['Category']?>" />
                                                <? if(isset($errors['Category'])){ ?>
                                                        <span class="error"><?=$errors['Category']?></span>
                                                <? } ?>  </td>
 <td><input  type="text" name="Value" id="Value"
                                              class="<? if(isset($errors['Value'])){ ?>error<? } ?>"
                                                value="<?=$rs['Value']?>" />
                                                <? if(isset($errors['Value'])){ ?>
                                                        <span class="error"><?=$errors['Value']?></span>
                                                <? } ?>  </td>
                                                
        
</tr>
 <tr><td></td><td><input type="Submit" name="Submit" value="Submit" /></td></tr></form>
</table>

</center>
</div>
       

</body>
